/*
 * @Date: 2022-04-01 09:59:43
 * @LastEditors: LiuPeng
 * @LastEditTime: 2022-04-01 11:45:47
 * @FilePath: \pay\src\components\Info\AgencyCardList\edit.jsx
 * @Description: 卡商列表 操作按钮 修改弹出层所示Form
 * 
 */

import React from 'react'
import {
  Form, Input, Radio,
  Row, Col,
} from 'antd'

export default function AgencyCardList(props) {

  // 点击修改按钮传入的数据
  let {
    GoogleKey,
    accountStatus,
    colour,
    merchantName,
    userName,
  } = props.currentRowData;
  /* 验证规则  Form.Item*/
  const rules = [{ required: true, message: '必填项不能为空！' }]


  return (
    <div style={{ 'padding': '10px 5px' }}>
      {/* 修改 */}
      <Form
        name="editForm"
        labelCol={{ span: 8 }}
        wrapperCol={{ span: 16 }}
        autoComplete="off"
      >
        <Row>
          {/* 用户名 */}
          <Col span={12}>
            <Form.Item
              label="用户名"
              name="userName"
              rules={rules}
              initialValue={userName}

            >
              <Input disabled />
            </Form.Item>
          </Col>
          {/* 卡商名称 */}
          <Col span={12}>
            <Form.Item
              label="卡商名称"
              name=" cardDealerName"
              rules={rules}
              initialValue={merchantName}
            >
              <Input />
            </Form.Item>
          </Col>
          {/* 谷歌认证码  谷歌密钥*/}
          <Col span={12}>
            <Form.Item
              label="谷歌认证码"
              name="GoogleAuthenticationCode"
              initialValue={GoogleKey}
            >
              <Input disabled />
            </Form.Item>
          </Col>
          {/* IP白名单 */}
          <Col span={12}>
            <Form.Item
              label="IP白名单"
              name=" IPWhitelist"
            >
              <Input placeholder='请输入IP白名单' />
            </Form.Item>
          </Col>
          {/* 最小金额 */}
          <Col span={12}>
            <Form.Item
              label="最小金额"
              name="minimumAmount"
              initialValue={0.00}
            >
              <Input />
            </Form.Item>
          </Col>
          {/* 最大金额 */}
          <Col span={12}>
            <Form.Item
              label="最大金额"
              name="maximumAmount"
              initialValue={10000000.00}
            >
              <Input />
            </Form.Item>
          </Col>
          {/* 费率(%)* */}
          <Col span={12}>
            <Form.Item
              label="费率(%)"
              name="rate"
              rules={rules}
              initialValue={0.00}
            >
              <Input />
            </Form.Item>
          </Col>
          {/* 单笔固定金额(元) */}
          <Col span={12}>
            <Form.Item
              label="单笔固定金额(元)"
              name="singleFixedAmount"
              rules={rules}
              initialValue={0.00}
            >
              <Input />
            </Form.Item>
          </Col>
          {/* 账号状态 */}
          <Col span={12}>
            <Form.Item
              label="账号状态"
              name="accountStatus"
              initialValue={accountStatus}
            >
              <Radio.Group >
                <Radio value='正常'>正常</Radio>
                <Radio value='冻结'>冻结</Radio>
              </Radio.Group>
            </Form.Item>
          </Col>
          {/* 谷歌验证码状态 */}
          <Col span={12}>
            <Form.Item
              label="谷歌验证码状态"
              name="GoogleVerificationCodeStatus"
              initialValue='关闭'
            >
              <Radio.Group >
                <Radio value='关闭'>关闭</Radio>
                <Radio value='启用'>启用</Radio>
              </Radio.Group>
            </Form.Item>
          </Col>
          {/* 登录白名单状态 */}
          <Col span={12}>
            <Form.Item
              label="登录白名单状态"
              name="loginWhitelistStatus"
              initialValue='关闭'
            >
              <Radio.Group >
                <Radio value='关闭'>关闭</Radio>
                <Radio value='启用'>启用</Radio>
              </Radio.Group>
            </Form.Item>
          </Col>
          {/* 标记颜色 */}
          <Col span={12}>
            <Form.Item
              label="标记颜色"
              name="markerColor"
              rules={rules}
              initialValue={colour}
            >
              <Input
                type='color'
              />
            </Form.Item>
          </Col>
        </Row>

      </Form>

    </div>
  )
}

